<ion-view view-title="手工选择质押股票">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">
        <ul ng-repeat="shares in sharesList"
            bo-class="{'Mt15':$first, 'Mt10':$index>0}">
            <li class="item">
                <label class="checkbox yCheckBox"
                       style="padding-left: 0">
                    <input type="checkbox"
                           ng-model="shares.checked"
                           ng-change="check()"
                           ng-checked="shares.checked"/>
                </label>
                <label bo-text="shares.name"></label>
            </li>
            <li class="item">
                <div class="row yMgPd">
                    <div class="col-60">
                        质押股数（可质押数量<span bo-text="shares.count"></span>股）
                    </div>
                    <div class="col-40 clr2 text-right Mb10"
                         style="margin-top: -10px">
                        <label class="checkbox yCheckBox">
                            <input type="checkbox"
                                   ng-model="shares.allCheck"
                                   ng-change="all($index)"
                                   ng-checked="shares.allCheck"
                                   ng-disabled="!shares.checked"/>
                        </label>
                        全部
                    </div>
                </div>
                <div class="row yMgPd">
                    <div class="col-20">
                        <button class="button button-full button-small"
                                ng-click="minus($index)"
                                ng-disabled="!shares.checked || shares.value<=0">
                            <i class="icon ion-minus-round clr2"></i>

                            <div class="clr2"
                                 style="margin-top: -12px">100
                            </div>
                        </button>
                    </div>
                    <div class="col-60">
                        <div class="clr2 text-center border-top-dark border-bottom-dark Mt10"
                             style="line-height: 43px;"
                             ng-bind="shares.value">
                        </div>
                    </div>
                    <div class="col-20">
                        <button class="button button-full button-small"
                                ng-click="plus($index)"
                                ng-disabled="!shares.checked || shares.value>=shares.count">
                            <i class="icon ion-plus-round clr2"></i>

                            <div class="clr2"
                                 style="margin-top: -12px">100
                            </div>
                        </button>
                    </div>
                </div>
                <div class="row yMgPd">
                    <div class="col-50 Mt10">
                        质押市值
                    </div>
                    <div class="col-50 text-right Mt10">
                        <span ng-bind="shares.marketValue | number:2"
                              class="clr2"></span>元
                    </div>
                </div>
            </li>
            <li class="item">
                <div class="row fs0 yMgPd">
                    <div class="col-50">
                        <p>
                            持股股数
                            <span bo-text="shares.count"></span>
                        </p>

                        <p class="Mt10">
                            折算率
                            <span bo-text="shares.rate | number:3"></span>%
                        </p>
                    </div>
                    <div class="col-50">
                        <p>
                            最新价
                            <span bo-text="shares.price | number:2"></span>元
                        </p>

                        <p class="Mt10">
                            手续费
                            <span bo-text="shares.counterFee | number:2"></span>元
                        </p>
                    </div>
                </div>
            </li>
        </ul>
        <div class="panel_head Mb10 Mt15">
            所需市值
            <span ng-bind="financingLoan.needMarketValue | number:2"></span>元
        </div>
        <div class="row light-bg yMgPd">
            <div class="col-67 Mt15 panel_head">
                <strong>
                    已选市值
                    <label class="clr2"
                           ng-bind="financingLoan.choseMarketValue | number:2"></label>元
                </strong>
            </div>
            <div class="col-33 text-right">
                <button class="button button-full ytf-bg"
                        style="margin: 0"
                        ng-click="submit()"
                        ng-disabled="financingLoan.choseMarketValue<financingLoan.needMarketValue">
                    <span class="light yfs2">
                        立即质押
                    </span>
                </button>
            </div>
        </div>
    </ion-content>
</ion-view>